<template>
  <Echart v-if="pageFlag" :options="options"></Echart>
  <reacquire v-else @click="getData"/>
</template>

<script>
import reacquire from '../../components/reacquire/reacquire.vue';

export default {
  components: { reacquire },
  data() {
    return {
      pageFlag:false,
      timer:null,
      options:{}
    };
  },
  filters: {
    
  },
  created() {
    this.getData()
  },
  mounted() {
  },
  beforeDestroy() {
    if (this.timer) {
      clearInterval(this.timer)
      this.timer = null
    }
  },
  methods: {
    initChart(){
      this.options={
        
      }
    },
    getData(){
      this.initChart()
      this.pageFlag=true
      this.switper
    },
    switper(){
      this.timer = setInterval(()=>{
        this.getData()
      },this.$store.state.setting.echartsAutoTime)
    }
  },
};
</script>
<style lang='scss' scoped>

</style>